<template>
  <div class="login-wrap">
    <div class="login-logo"></div>
    <div class="login-title">能点在线课堂</div>
    <div class="login-box u-fx-ac-jc">
      <div style="width: 360px">
        <div class="title">登录</div>
        <div class="login-input">
          <a-input v-model="phone" placeholder="请输入手机号" />
        </div>
        <div class="login-input u-fx-ac">
          <a-input v-model="captcha" placeholder="请输入验证码" />
          <div class="code-btn" @click="_getCode">{{ yzmTip }}</div>
        </div>
        <a-button
          :disabled="phone === '' || captcha === ''"
          :loading="isLogin"
          style="width: 360px; height: 48px"
          type="primary"
          @click="_login"
          >登录</a-button
        >
        <div class="u-fx-ac u-fx-jsb" style="margin-top: 30px">
          <a-checkbox @change="remember">记住账号</a-checkbox>
          <span>*新用户初次登录将自动注册</span>
        </div>
      </div>
    </div>
    <div class="footer">
      Copyright © 2017-2021 武汉全品教育科技有限公司All Right Reserved |
      鄂ICP备16018693号-1
    </div>
  </div>
</template>

<script>
export default {
  name: 'Login',
  data() {
    return {
      isLogin: false,
      phone: '',
      captcha: '',
      yzmTip: '获取验证码',
      total: 90
    }
  },
  methods: {
    /**
     * @description 获取验证码
     */
    async _getCode() {},
    /**
     * @description 用户登录
     */
    async _login() {
      this.$router.push('/home')
    },
    /**
     * @description 记住账号
     */
    remember() {}
  }
}
</script>
<style lang="less" scoped>
.login-wrap {
  position: absolute;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 10;
  background-color: #ccc;
}
.login-logo {
  position: absolute;
  z-index: 100;
  top: 59px;
  left: 77px;
  width: 170px;
  height: 74px;
}
.login-title {
  position: absolute;
  width: 488px;
  transform: translateX(-244px);
  left: 50%;
  z-index: 100;
  top: 80px;
  text-align: center;
  font-size: 42px;
  color: #fff;
  font-weight: 400;
  letter-spacing: 2px;
}
.login-box {
  width: 488px;
  height: 467px;
  position: absolute;
  z-index: 120;
  left: 50%;
  transform: translate(-244px, 170px);
  background-color: #fff;
  border-radius: @u-border-radius;
  box-shadow: 0px 20px 44px 15px rgba(14, 63, 165, 0.2);
  .title {
    padding-bottom: 50px;
    text-align: center;
    font-size: 24px;
  }
  .login-input {
    overflow: hidden;
    width: 100%;
    height: 48px;
    border: 1px #ccc solid;
    border-radius: 6px;
    margin-bottom: 40px;
  }
  input {
    height: 48px;
    border: none;
  }
  .code-btn {
    width: 120px;
    line-height: 48px;
    text-align: right;
    margin: 0 15px;
    color: @u-type-primary;
    cursor: pointer;
  }
}
.footer {
  position: absolute;
  width: 100%;
  color: #46a7ff;
  z-index: 100;
  bottom: 10px;
  text-align: center;
}
</style>
